package com.example.zuelweb.controller;


import com.example.zuelweb.entity.Reresult;
import com.example.zuelweb.service.FindService;
import com.example.zuelweb.util.JSONResult;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@RestController
public class LogController {

    @Resource
    private FindService findService;

    @GetMapping("/log/list")
    public JSONResult logfindall(){

        List<Reresult> list = new ArrayList<>(findService.mysql_findall());

        return JSONResult.ok(list);
    }


    @GetMapping(value = "/log/delete/{filename}")
    public void logdelete(@PathVariable String filename){
        findService.mysql_delete(filename);
    }



}
